import request from "@/utils/request"

export const findAllCategory = () => {
    return request('/home/category/head')
}

export const findBrandCategory = (limit) => {
    return request('/home/brand', 'get', limit)
}

export const findBanner = () => {
    return request('/home/banner')
}

export const findNew = (limit) => {
    return request('/home/new', 'get', limit)
}

export const findBrand = (limit) => {
    return request('/home/brand', 'get', limit)
}

export const findTopCategory = (params) => {
    return request('/category', 'get', params)
}

/**
 *二级类目-筛选条件-PC
 * @param { Number } id 二级分类ID
 * @returns Promise
 */
export const findSubFilter = (id) => {
    return request('/category/sub/filter', 'get', { id: id })
}

/**
 * 商品列表--分页查询
 * @param {  }
 * @returns Promise
 */
export const findCategoryGoods = (data) => {
    return request('/category/goods', 'POST', data)
}